package com.chuangke.regulation.controller;

import com.chuangke.common.http.HttpResult;
import com.chuangke.regulation.service.RgNkqxzyGwzzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/regulation/nkqx")
public class RgNkqxzyGwzzController {

    @Autowired
    private RgNkqxzyGwzzService rgNkqxzyGwzzService;

    @PreAuthorize("hasAuthority('login:action')")
    @GetMapping("/find")
    public HttpResult reCreateIndex(String postName) {
        return HttpResult.ok(rgNkqxzyGwzzService.findByPostName(postName));
    }

}
